<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<link rel="shortcut icon" href="../resources/favicon.ico" th:href="@{/static/favicon.ico}"/>
<link th:href="@{/static/bootstrap/css/bootstrap.min.css}" rel="stylesheet"/>
<link th:href="@{/static/bootstrap/treeview/bootstrap-treeview.min.css}" rel="stylesheet"/>
<link th:href="@{/static/font-awesome/css/font-awesome.min.css}" type="text/css" rel="stylesheet"/>
<link th:href="@{/static/bootstrap/toastr/toastr.min.css}" rel="stylesheet"/>
<link th:href="@{/static/bootstrap/editable/css/bootstrap-editable.css}" rel="stylesheet" />
<link th:href="@{/static/bootstrap/table/bootstrap-table.min.css}"  rel="stylesheet" />
<link th:href="@{/static/bootstrap/datapicker/bootstrap-datetimepicker.min.css}"  rel="stylesheet" />
<link th:href="@{/static/layui/css/layui.css}"  rel="stylesheet" />
<style>
	.container-div{
		width:98.5%;
		height:80%;
	}
	form{
	    margin-right: 5px;
	}
	.ibox {
		margin-top:5px;
	    margin-bottom: 5px;
	    background-color: white;
	    border: 1px solid #ddd;
	    border-radius: 0px;
	    height: 480px;
	}
	.node-deptTree {
	    height: 30px;
	}
	.dropDownDiv{
		display: none;
		position:absolute; 
		z-index:1010;
	    background-color:white;
	    width:385px;
	    height: 360px;
		margin-left: 1px;
		border: 1.5px solid #ccc;
	}
	.time{
		border: 1px solid #ddd;
	    border-radius: 4px;
	    background: transparent;
	    outline: none;
	    height: 30px;
	    width: 200px;
	    padding-left: 5px;
	}
	.margin-l{
		margin-left:15px;
	}
	.transform{
		transform: rotate(-180deg);
		color: #46b8da;
	}
	.pagination>.active>a{
		z-index: 3;
	    color: #fff;
	    cursor: default;
	    background-color: #5bc0de;
	    border-color: #46b8da;
	}
</style>
</head>
<body>
<div class="container-div">
	<shiro:hasPermission name="post:remove"><input type="hidden" id="post-remove" value='pr'/></shiro:hasPermission>
	<div class="row" style="margin-top:5px;">
		<div class="col-sm-5">
			<div style="height:30px;width: 420px;margin-left:15px;float: left;">
		        <div class="input-group input-group-sm">
		            <input type="text" class="form-control input-mini" id="deptInput" placeholder="请选择部门" autocomplete="off">
		            <div class="input-group-btn">
		                <button type="button" class="btn btn-white" id="bb">
		                    <span class="caret"></span>
		                </button>
		            </div>
		        </div>
		        <div id="deptTree" class="dropDownDiv"></div>
			</div>
		</div>
		<div class="col-sm-7">

	    </div>
	</div>
    <div class="row">
        <div class="col-sm-5" id="left">
            <div class="ibox margin-l">
                <div style="margin:5px;text-align:right;">
                	<label style="float:left;color:red" id="left_title"></label>
                    <button shiro:hasPermission="post:add" class="btn btn-info btn-sm" id="closeAdd">
                   		<i class="fa fa-chevron-circle-left"></i> <span>收起</span>
            		</button>
                </div>
                <div class="ibox-content">
					<form role="form" class="form-horizontal m-t" id="postForm">
						<input type="hidden" id="deptId" name="deptId"> 
						<input type="hidden" id="postId" name="postId"> 
                            <div class="form-group draggable">
                                <label class="col-sm-3 control-label">所属部门：</label>
                                <div class="col-sm-9">
                                    <div id="deptLable" style="width:100%;height:34px;padding-top:5px;font-size: 14px;"></div>
                                </div>
                            </div>
                            <div class="form-group draggable">
                                <label class="col-sm-3 control-label">岗位编码：</label>
                                <div class="col-sm-9">
                                    <input type="text" name="postCode" id="postCode" class="form-control" placeholder="请输入">
                                </div>
                            </div>
                            <div class="form-group draggable">
                                <label class="col-sm-3 control-label">岗位名称：</label>
                                <div class="col-sm-9">
                                    <input type="text" name="postName" id="postName" class="form-control" placeholder="请输入">
                                </div>
                            </div>
                            <div class="form-group draggable">
                                <label class="col-sm-3 control-label">岗位说明：</label>
                                <div class="col-sm-9">
                                    <textarea  name="description" id="description" class="form-control" placeholder="请输入文本" style="height:80px;"></textarea>
                                </div>
                            </div>         
                            <div class="form-group draggable">
                                <label class="col-sm-3 control-label">岗位备注：</label>
                                <div class="col-sm-9">
                                    <textarea  name="remark"  id="remark" class="form-control" placeholder="请输入文本" style="height:80px;"></textarea>
                                </div>
                            </div>         
                            <div class="form-group draggable">
                                <label class="col-sm-3 control-label">岗位状态：</label>
                                  <div class="col-sm-9" style="margin-top: 7px;">
                                    <label class="radio-box"><input type="radio" checked value="1" id="option1" name="state">&nbsp;启用</label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <label class="radio-box"><input type="radio" value="0" id="option2" name="state">&nbsp;停用</label>
                                </div>
                            </div>         
                            <div class="form-group draggable">
                                <div class="col-sm-12 col-sm-offset-4">
									<input id="savePost" type="submit" class="btn btn-info btn-sm" value="提交"/>
									<button id="resetBtn" class="btn btn-info btn-sm" type="button">重置</button>
                                </div>
                            </div>
                        </form>
                </div>
            </div>
        </div>
        <div class="col-sm-12" id="right">
            <div id="ibox-r" class="ibox float-e-margins margin-l" >
                <div class="ibox-title" style="margin: 5px;">
                    <button shiro:hasPermission="post:add" class="btn btn-info btn-sm" onclick="onclickBtn('add')">
                   		<i class="fa fa-plus"></i> <span id='addText'>添加</span>
            		</button>
                    <button shiro:hasPermission="post:edit" class="btn btn-info btn-sm" onclick="onclickBtn('edit')">
                   		<i class="fa fa-edit"></i> <span id='editText'>编辑</span>
            		</button>
			       	<a style="float:right;" class="btn btn-info btn-sm" onclick="postRest()"><i class="fa fa-close"></i>&nbsp;重置</a>
			       	<a style="float:right;margin-right: 5px;" class="btn btn-info btn-sm" onclick="postSearch()"><i class="fa fa-search"></i>搜索</a>
			       	<input type="text" style="float:right;width:14%;margin-right: 5px;" class="form-control  input-sm" id="key" name="key" placeholder="岗位名称" autocomplete="off"/>
            		<div class="input-daterange input-group input-group-sm" style="float:right;width:43%;margin-right: 5px;">
		           		<input type="text" class="form-control" id="bgnTime"  placeholder="起始日期" autocomplete="off"/>
		           		<span class="input-group-addon">-</span>
		           		<input type="text" class="form-control" id="endTime"  placeholder="截止日期" autocomplete="off"/>
		       		</div>
                </div>	
                <div style="margin-top: -20px;">
                	<table id="tb_post"></table><!-- 表格插件 -->
                </div>
            </div>
        </div>
    </div>
</div>

<script th:src="@{/static/js/jquery-2.1.1.min.js}"></script>
<script th:src="@{/static/bootstrap/js/bootstrap.min.js}"></script>
<script th:src="@{/static/bootstrap/treeview/bootstrap-treeview.min.js}"></script>
<script th:src="@{/static/bootstrap/toastr/toastr.min.js}"></script>
<script th:src="@{/static/bootstrap/datapicker/bootstrap-datetimepicker.min.js}"></script>
<script th:src="@{/static/bootstrap/datapicker/bootstrap-datetimepicker.zh-CN.js}"></script>
<script th:src="@{/static/bootstrap/editable/js/bootstrap-editable.js}"></script>
<script th:src="@{/static/bootstrap/table/bootstrap-table.min.js}"></script>
<script th:src="@{/static/bootstrap/table/locale/bootstrap-table-zh-CN.min.js}"></script>
<script th:src="@{/static/layui/layui.all.js}" type="text/javascript"></script>
<script th:src="@{/static/js/aboutPost.js}"></script>
</body>
</html>